package myTest;

import java.util.UUID;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class StringTest {
    public static void main(String[] args) {
        Long s = null;
        System.out.println(String.valueOf(s));
        //System.out.println(Long.toString(s));

        String a = "a" + "b";
		
		/*System.out.println(a);
		try {
			Thread.sleep(100000);
		} catch (InterruptedException e) {
			e.printStackTrace();
		}*/
        Pattern pattern = Pattern.compile("");
        Matcher matcher = pattern.matcher("sb");
        if (matcher.find()) {
            System.out.println("xxxx");

        }
        //String s1 = "s1";
        String random = UUID.randomUUID().toString();
        //random.intern();
        String s2 = new String(random);
        String s3 = new String(random);
        System.out.println(s3 == s2);
        System.out.println(s2.intern() == s3.intern());
        System.out.println(s3 == s2.intern());
        System.out.println(s3.intern() == s2);
        System.out.println(s3.intern() == random);

    }

}
